package com.recruit.wechat.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;


/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 肖守凯
 * @since 2019-09-03
 */
@TableName("tr_user")
@ToString
@Data
@ApiModel(value = "User对象", description = "用户表")
public class AdminUser extends Model<AdminUser> {


    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Integer id;


    @ApiModelProperty(value = "账户名称")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "单位名称")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "密码")
    @TableField("pass_word")
    private String passWord;

    @ApiModelProperty(value = "1管理员 /0普通用户")
    @TableField("user_admin")
    private Integer userAdmin;


    @TableField(exist = false)
    private Role role;


    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }


}
